package cn.xopencode.userservice.rpc.evaluate.dto;

import cn.xopencode.common.framework.validator.InEnum;
import cn.xopencode.userservice.enums.EvaluateStatus;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.experimental.Accessors;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.util.Date;

/**
 * 创建员工自评时用的DTO
 *
 * @Author xiaodawei
 * @since 2021/9/22
 */
@Data
@Accessors(chain = true)
@ApiModel("创建员工自评")
public class CreateEvaluateDTO implements Serializable {


    @ApiModelProperty(value = "当前登陆用户的ID", hidden = true)
    private String userId;

    @NotBlank(message = "员工自评信息")
    @ApiModelProperty(value = "员工自评信息", required = true)
    private String selfEvaluation;

    @NotNull
    @ApiModelProperty(value = "自评日期", required = true)
    private Date evaluationDate;

    @ApiModelProperty(value = "备注")
    private String remark;

    @InEnum(value = EvaluateStatus.class, message = "审批状态必须是 {value}")
    @ApiModelProperty(value = "审批状态：0待审批 1已审批 2已驳回")
    private Integer status;

}
